package cn.edu.ctbu.lablist.service;

import cn.edu.ctbu.lablist.domain.Student;
import cn.edu.ctbu.lablist.domain.Teacher;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface TeacherService {

    /**
     * 查询所有教师信息
     * @return
     */
    public List<Teacher> findAll();
    /**
     * 只分页的查询
     * @param pageable
     * @return
     */
    public Page<Teacher> findAll(Pageable pageable);
    /**
     *分页，带过滤的查询
     * @param teacher
     * @param pageable
     * @return
     */
    public Page<Teacher> findAll(Example<Teacher> teacher, Pageable pageable);
    /**
     * 按id进行查询
     * @param id 主键，整数
     * @return
     */
    public Teacher findById(Integer id);
    /**
     * 按名字进行查询,Like
     * @param name 字符串
     * @return
     */
    public List<Teacher> findByName(String name);
    /**
     * 按名字和密码查询
     * @param name
     * @param password
     * @return
     */
    public List<Teacher> findByNameAndPassword(String name,String password);
    /**
     * 按教师编号和密码查询
     * @param no
     * @param password
     * @return
     */
    public List<Teacher> findByNoAndPassword(String no,String password);
    /**
     * 插入教师信息
     * @param teacher
     */
    public void insert(Teacher teacher);
    /**
     * 修改教师信息
     * @param teacher
     */
    public void update(Teacher teacher);
    /**
     * 删除教师信息
     * @param id
     */
    public void delete(Integer id);
    /**
     * 按教师编号查找,Like
     * @param no
     * @return
     */
    public Teacher findByNo(String no);

}